﻿import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Window 2.15

Window {
    width: 800
    height: 600
    visible: true

    Column {
        anchors.fill: parent

        VideoDisplay {
            id: videoDisplay
            width: parent.width
            height: parent.height - 50
        }

        ProgressBar {
            width: parent.width
            from: 0
            to: videoController.duration
            value: videoController.position
        }

        Row {
            Button {
                text: "Play"
                onClicked: videoController.play("E:/abc-120.mp4")
            }
            Button {
                text: "Stop"
                onClicked: videoController.stop()
            }
        }
    }
}
